package eng.jTrussSolver.AssemblerResults;

import java.util.HashMap;


	public class RodDisplacementHashMap extends HashMap<Integer, RodDisplacementData> {
	
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		private int _RodDisplacementCounter;
		
		public RodDisplacementHashMap() {
			_RodDisplacementCounter = 0;
		}
		
	
		
		/**
		 * adds rods at the end of rods list
		 * @param Rod
		 */
		public void addDisplacementRod(RodDisplacementData rodDD) {
			this.put(_RodDisplacementCounter, rodDD);
			_RodDisplacementCounter =_RodDisplacementCounter+1;
		}
	
		
		public int getRodDisplacementCount() {
			return this._RodDisplacementCounter;
		}
		/**
		 * Clears() Hashmap and also resets counter.
		 */
		public void clear() {
			super.clear();
			this._RodDisplacementCounter = 0;
		}
	
	}